package com.amita.ez.vo;

import lombok.Data;
import lombok.ToString;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@ToString
public class MenuVO {

    private boolean alwaysShow;
    private Long oid;
    private Long pid;;
    private Integer type;
    private List<MenuVO> children;
    private String component;
    private Boolean hidden;
    private String name;
    private String path;
    private String redirect;
    private String title;
    private String icon;
    private Boolean cache;
    private Boolean iframe;
    private Integer menuSort;

    public Object getMeta(){
        Map<String, Object> map = new HashMap<>();
        map.put("icon", this.icon);
        map.put("noCache", this.cache);
        map.put("title", this.title);
        return map;
    }


    public Long getId(){
        return this.oid;
    }
    public String getLabel(){
        return this.title;
    }

}
